#ifndef _gtalk_ui_h_
#define _gtalk_ui_h_
#include "vmsys.h"

#define QCIF_WIDTH		176
#define QCIF_HEIGHT		220

#define QCIF_LS_WIDTH	220
#define QCIF_LS_HEIGHT	176

#define QVGA_WIDTH		240
#define QVGA_HEIGHT		320

#define QVGA_LS_WIDTH	320
#define QVGA_LS_HEIGHT	240

#define WQVGA_WIDTH		240
#define WQVGA_HEIGHT	400

enum lcd_support
{
	ENUM_SUPPORT_START = 0,
	ENUM_SUPPORT_QCIF = ENUM_SUPPORT_START,
	ENUM_SUPPORT_QCIF_LS,
	ENUM_SUPPORT_QVGA,
	ENUM_SUPPORT_QVGA_LS,
	ENUM_SUPPORT_WQVGA,

	ENUM_SUPPORT_END
};

enum enum_img_id
{
	IMG_ID_START = 0,
	IMG_ID_LOGIN_LOGO = IMG_ID_START,
	IMG_ID_BTN_BG,
	IMG_ID_TITLEBG,
	IMG_ID_ARROW,
	IMG_ID_STATUSOFFLINE,
	IMG_ID_STATUSAWAY,
	IMG_ID_STATUSONLINE,
	IMG_ID_COMEMSG,

	IMG_ID_END
};

struct img_struct
{
	VMINT8*  img_name;
	VMUINT8* img_data;
	VMINT	 img_size;
};

struct rect
{
	VMINT left;
	VMINT top;
	VMINT right;
	VMINT bottom;
};

struct gtalk_ui_struct
{
	struct rect login_logo;
	struct rect login_label_user;
	struct rect login_edit_user;
	struct rect login_label_pass;
	struct rect login_edit_pass;
	
	struct rect title_top_bg;
	struct rect title_img_status;
	struct rect title_msg_status;

	struct rect listbox;
	struct rect listbox_img_status;
	struct rect listbox_username;
	struct rect listbox_img_msgcome;
	struct rect listbox_img_arrow;

	struct rect softkey_bar;
};

extern struct gtalk_ui_struct gtalk_ui;
extern VMINT screen_width;
extern VMINT screen_height;
extern VMINT cur_lcd_support;

extern void lcd_support_init(void);
extern VMSTR get_img_name(VMINT index);

#endif
